<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('交易流水列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li class="select-time">
                                <p>交易日期：</p>
                                <input type="text" class="time-input" id="startTime" th:value="${#dates.format(paeaDsTrade.trDate,'yyyy-MM-dd')}" name="trDate"/>
                            </li>
                            <li>
                                <p>机构号：</p>
                                <input type="text" name="brCode" th:value="${paeaDsTrade.brCode}"/>
                            </li>
                            <li>
                                <p>柜员号：</p>
                                <input type="text" name="trTelr" th:value="${paeaDsTrade.trTelr}"/>
                            </li>
                            <li>
                                <p>交易码：</p>
                                <input type="text" name="txnCde"/>
                            </li>
                            <li>
                                <p>流水号：</p>
                                <input type="text" name="vchNo" th:value="${paeaDsTrade.vchNo}"/>
                            </li>
                            <li>
                                <p>交易金额：</p>
                                <input type="text" name="txnAmt"/>
                            </li>
                            <li>
                                <p>账号：</p>
                                <input type="text" name="accNo"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <!--<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="paea:paeaDsTrade:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="paea:paeaDsTrade:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="paea:paeaDsTrade:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>-->
                <a class="btn btn-success" onclick="$.operate.detailTab()" shiro:hasPermission="paea:paeaDsTrade:detail">
                    <i class="fa fa-adjust"></i> 详情
                </a>
                <a class="btn btn-primary" onclick="showTradeTellerImages()" shiro:hasPermission="paea:paeaDsTrade:tellerImages">
                    <i class="fa fa-angellist"></i> 当日柜员流水影像
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="paea:paeaDsTrade:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('paea:paeaDsTrade:edit')}]];
        var removeFlag = [[${@permission.hasPermi('paea:paeaDsTrade:remove')}]];
        var statusDatas = [[${@dict.getType('paea_ds_trade_status')}]];
        var filterFlagDatas = [[${@dict.getType('paea_ds_trade_filter_flag')}]];
        var prefix = ctx + "paea/paeaDsTrade";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                detailUrl: prefix + "/detail/{id}",
                modalName: "交易流水",
                //启用跳转至指定页
                showPageGo: true,
                //启用点击选中行
                clickToSelect: true,
                columns: [{
                    radio: true
                },
                {
                    field : 'id', 
                    title : '主键',
                    visible: false
                },
                {
                    field : 'code', 
                    title : '代码',
                    visible: false
                },
                {
                    field : 'name', 
                    title : '挂失日期/冻结日期',
                    visible: false
                },
                {
                    field : 'trDate', 
                    title : '交易日期'
                },
                {
                    field : 'txnTime', 
                    title : '交易时间'
                },
                {
                    field : 'brCode', 
                    title : '机构号'
                },
                {
                    field : 'trTelr', 
                    title : '柜员号'
                },
                {
                    field : 'txnCde', 
                    title : '交易码'
                },
                {
                    field : 'txnSeq', 
                    title : '交易流水号'
                },
                {
                    field : 'vchNo', 
                    title : '交易流水号'
                },
                {
                    field : 'txnAmt', 
                    title : '交易金额'
                },
                {
                    field : 'ccyCode', 
                    title : '货币码'
                },
                {
                    field : 'accNo', 
                    title : '账号'
                },
                {
                    field : 'status',
                    title : '补录状态',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(statusDatas, value);
                    }
                }/*,
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }*/]
            };
            $.table.init(options);
        });

        function showTradeTellerImages() {
            var row = $("#bootstrap-table").bootstrapTable('getSelections')[0];
            //$.modal.openTab("当日柜员流水影像", prefix + "/tellerImages/"+row.id);
            window.showModalDialog(prefix + "/tellerImages/"+row.id,"当日柜员流水影像","dialogWidth=960px; dialogHeight=650px; help=no;top=0; status=no; scroll=yes; resizable=no;");
        }
    </script>
</body>
</html>